package com.placement.refresh.dao;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.rssowl.core.internal.persist.News;

import com.placement.refresh.model.Job;
import com.placement.refresh.model.RefreshContextBVO;
import com.placement.refresh.model.SourceContextBVO;

/**
 * purpose : This class handle database operation for TPA 
 * 
 * @author Amit Chaddha
 *
 */
public interface RefreshDAO {

	
	public static final String BATCH_RUN_DATE="BATCH_RUN_DATE";	
	public static final String CONTEXT_ID="CONTEXT_ID";	
	
	
	/**
	 * Purpose: This method returns REFRESH context 
	 * 
	 * @param refereshContextId		:String runType	 * 
	 * @return					:SourceContextBVO object
	 */
	SourceContextBVO getRefreshContext();
	
		
	/**
	 * Purpose: This method returns CurrBatchRun Context
	 * 
	 * @return	:RefreshContextBVO object
	 */
	RefreshContextBVO getCurrBatchRunContext();


	/**
	 * Purpose: This method save Context in Job DB and return contextId;
	 * 
	 * @param currContextBVO	:RefreshContextBVO object
	 * @return
	 */
	Long saveContext(RefreshContextBVO currContextBVO);


	
	/**
	 * Purpose: This method returns system date/time.
	 * 
	 * @return	:Date object
	 */
	Date getSystemDate();
	
	/**
	 * Check to see if the process to get jobs id in progress
	 * @param processId
	 * @return
	 */
	public boolean isProcessCompleted(int processId);
	
	/**
	 * save the jobs in oracle database Jobs
	 */
	public void saveJobsData(ArrayList<News> NewsBVOList, Long ContextId);


	void saveJobListing(ArrayList<Job> jobList);


	public Long findZipcode(String state, String city);
	}
